package com.jzl.swing.dao;

import java.sql.SQLException;
import java.util.List;

import com.jzl.swing.entity.Bill;

public interface BillDao {
	/**
	 * 插入账单
	 * @param bill
	 * @return
	 * @throws SQLException
	 */
	public abstract int add(Bill bill)throws SQLException;
	/**
	 * 删除账单
	 * @param bill
	 * @return
	 * @throws SQLException
	 */
	public abstract int delete(Bill bill)throws SQLException;
	/**
	 * 修改账单
	 * @param bill
	 * @return
	 * @throws SQLException
	 */
	public abstract int modify(Bill bill)throws SQLException;
	/**
	 * 查询所有账单
	 * @return
	 * @throws SQLException
	 */
	public abstract List<Bill> queryAll()throws SQLException;
	/**
	 * 通过账单名和账单付款情况查询账单
	 * @param name
	 * @param paid
	 * @return
	 * @throws SQLException
	 */
	public abstract List<Bill> queryByNameAndPaid(String name, String paid) throws SQLException;
	/**
	 * 
	 * @param number
	 * @return
	 * @throws SQLException
	 */
	public abstract Bill queryByNumber(String number)throws SQLException;
	public abstract int delete(String number)throws SQLException;
}
